home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Magazine / Morphos / GCC / ppc-amigaos / lib / ldscripts / elf32ppc.xn < prev    next >
Text File  |  1997-09-16  |  4KB  |  128 lines

  1. OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc",
  2.           "elf32-powerpc")
  3. OUTPUT_ARCH(powerpc)
  4. ENTRY(_start)
  5. SEARCH_DIR(/ade/os-lib); SEARCH_DIR(/ade/lib); SEARCH_DIR(/ade/ppc-amigaos/lib);
  6. /* Do we need any of these for elf?
  7.    __DYNAMIC = 0;    */
  8. PROVIDE (__stack = 0);
  9. SECTIONS
  10. {
  11.   /* Read-only sections, merged into text segment: */
  12.   . = 0x40000 + SIZEOF_HEADERS;
  13.   .interp   : { *(.interp) }
  14.   .hash          : { *(.hash)        }
  15.   .dynsym      : { *(.dynsym)        }
  16.   .dynstr      : { *(.dynstr)        }
  17.   .rela.text      : { *(.rela.text)     }
  18.   .rela.data      : { *(.rela.data)     }
  19.   .rela.rodata      : { *(.rela.rodata)     }
  20.   .rela.got      : { *(.rela.got)    }
  21.   .rela.got1      : { *(.rela.got1)    }
  22.   .rela.got2      : { *(.rela.got2)    }
  23.   .rela.ctors      : { *(.rela.ctors)    }
  24.   .rela.dtors      : { *(.rela.dtors)    }
  25.   .rela.init      : { *(.rela.init)    }
  26.   .rela.fini      : { *(.rela.fini)    }
  27.   .rela.bss      : { *(.rela.bss)    }
  28.   .rela.plt      : { *(.rela.plt)    }
  29.   .rela.sdata      : { *(.rela.sdata2)    }
  30.   .rela.sbss      : { *(.rela.sbss2)    }
  31.   .rela.sdata2      : { *(.rela.sdata2)    }
  32.   .rela.sbss2      : { *(.rela.sbss2)    }
  33.   .plt   : { *(.plt) }
  34.   .text      :
  35.   {
  36.     *(.text)
  37.     /* .gnu.warning sections are handled specially by elf32.em.  */
  38.     *(.gnu.warning)
  39.   } =0
  40.   .init          : { *(.init)        } =0
  41.   .fini          : { *(.fini)        } =0
  42.   .rodata      : { *(.rodata)  }
  43.   .rodata1      : { *(.rodata1) }
  44.   _etext = .;
  45.   PROVIDE (etext = .);
  46.   .sdata2   : { *(.sdata2) }
  47.   .sbss2   : { *(.sbss2) }
  48.   /* Adjust the address for the data segment.  We want to adjust up to
  49.      the same address within the page on the next page up.  It would
  50.      be more correct to do this:
  51.        . = ALIGN(0x40000) + (ALIGN(8) & (0x40000 - 1));
  52.      The current expression does not correctly handle the case of a
  53.      text segment ending precisely at the end of a page; it causes the
  54.      data segment to skip a page.  The above expression does not have
  55.      this problem, but it will currently (2/95) cause BFD to allocate
  56.      a single segment, combining both text and data, for this case.
  57.      This will prevent the text segment from being shared among
  58.      multiple executions of the program; I think that is more
  59.      important than losing a page of the virtual address space (note
  60.      that no actual memory is lost; the page which is skipped can not
  61.      be referenced).  */
  62.   . =  ALIGN(8) + 0x40000;
  63.   .data    :
  64.   {
  65.     *(.data)
  66.     CONSTRUCTORS
  67.   }
  68.   .data1   : { *(.data1) }
  69.   .got1          : { *(.got1) }
  70.   .dynamic      : { *(.dynamic) }
  71.   /* Put .ctors and .dtors next to the .got2 section, so that the pointers
  72.      get relocated with -mrelocatable. Also put in the .fixup pointers.
  73.      The current compiler no longer needs this, but keep it around for 2.7.2  */
  74.         PROVIDE (_GOT2_START_ = .);
  75.   .got2          :  { *(.got2) }
  76.         PROVIDE (__CTOR_LIST__ = .);
  77.   .ctors      : { *(.ctors) }
  78.         PROVIDE (__CTOR_END__ = .);
  79.         PROVIDE (__DTOR_LIST__ = .);
  80.   .dtors      : { *(.dtors) }
  81.         PROVIDE (__DTOR_END__ = .);
  82.         PROVIDE (_FIXUP_START_ = .);
  83.   .fixup      : { *(.fixup) }
  84.         PROVIDE (_FIXUP_END_ = .);
  85.         PROVIDE (_GOT2_END_ = .);
  86.         PROVIDE (_GOT_START_ = .);
  87.   .got          : { *(.got) }
  88.   .got.plt      : { *(.got.plt) }
  89.         PROVIDE (_GOT_END_ = .);
  90.   /* We want the small data sections together, so single-instruction offsets
  91.      can access them all, and initialized data all before uninitialized, so
  92.      we can shorten the on-disk segment size.  */
  93.   .sdata      : { *(.sdata) }
  94.   _edata  =  .;
  95.   PROVIDE (edata = .);
  96.   .sbss      :
  97.   {
  98.     PROVIDE (__sbss_start = .);
  99.     *(.sbss)
  100.     *(.scommon)
  101.     PROVIDE (__sbss_end = .);
  102.   }
  103.   .bss       :
  104.   {
  105.    PROVIDE (__bss_start = .);
  106.    *(.dynbss)
  107.    *(.bss)
  108.    *(COMMON)
  109.   }
  110.   _end = . ;
  111.   PROVIDE (end = .);
  112.   /* These are needed for ELF backends which have not yet been
  113.      converted to the new style linker.  */
  114.   .stab 0 : { *(.stab) }
  115.   .stabstr 0 : { *(.stabstr) }
  116.   /* DWARF debug sections.
  117.      Symbols in the .debug DWARF section are relative to the beginning of the
  118.      section so we begin .debug at 0.  It's not clear yet what needs to happen
  119.      for the others.   */
  120.   .debug          0 : { *(.debug) }
  121.   .debug_srcinfo  0 : { *(.debug_srcinfo) }
  122.   .debug_aranges  0 : { *(.debug_aranges) }
  123.   .debug_pubnames 0 : { *(.debug_pubnames) }
  124.   .debug_sfnames  0 : { *(.debug_sfnames) }
  125.   .line           0 : { *(.line) }
  126.   /* These must appear regardless of  .  */
  127. }
  128.